home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
k
/
kids7.dms
/
kids7.adf
/
pack.amos
/
pack.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-10-04
|
5KB
|
147 lines
Dim GOODS(4)
Global GOODS(),ZIPPED,LEVEL,SCORE,NAME$
INST : ANT
Procedure ANT
Music 1 : Unpack 10 To 0 : Screen Display 0,120,34,, : Double Buffer : Limit Mouse 330,247 To 400,250 : Set Font 3
Channel 1 To Bob 1 : Channel 2 To Bob 2 : Channel 10 To Bob 10 : Channel 11 To Bob 11
Bob 9,215,173,19 : Bob 10,197,169,20 : Bob 11,240,0,14 : Bob 1,330,185,18 : Wait Vbl
A1$="A 0,(18,10)(17,10)" : A1$=A1$+"F RA=1 T 35; M -10,0,5; N RA;" : Amal 1,A1$ : Amal On 1
While Chanmv(1)
MK=Mouse Key : If MK>0 Then ZIP : MK=0
Wend
Wait 10 : Amal Off 1
Bob 5,5,70,13 : Sam Play 6,5,7000 : Wait 10 : Bob 1,20,180,17 : Wait 25 : Bob 1,5,180,18 : Wait 50
THROW
End Proc
Procedure INST
STRIPPER
If Screen=0 Then Screen Close 0
Colour Back $BBB : Extension_5_0120 "kids-7:bits/bobs.abk",1
Screen Open 0,352,272,32,Lowres : Screen Display 0,120,34,, : Curs Off : Flash Off : Cls 21
Get Bob Palette : Get Fonts : Set Font 3 : For N=1 To 4 : GOODS(N)=0 : Next N : Ink 11,21
Text 110,48,"Click the zip."
A$="ONLY pack these "+Str$(LEVEL+1)+" . . ."
Text 30,118,A$
For N=1 To LEVEL : Read BX : Next N
Data 80,40,15
BY=130
For N=1 To LEVEL+1
Repeat
K=True
X=Rnd(11)+1
For M=1 To N
If GOODS(M)=X
K=False
End If
Next M
Until K=True
GOODS(N)=X
Paste Bob BX,BY,X : Add BX,80
Next N
K=0 : T=Timer : PB=35000
Repeat
If Timer mod 25=0
If I=21 : I=3 Else I=21 : End If
If PB=35000 : PB=20000 : Else PB=35000 : End If
Ink I,21 : Text 30,118,"ONLY" : Wait Vbl : Sam Play 15,1,PB
End If
Until Timer=>T+400
Screen Close 0
End Proc
Procedure THROW
A1$="M 245,-160,18" : A2$="A 2,(15,10)(16,10)(14,10)" : A3$="M 18,146,100"
A4$="L: M 30,0,30; P; M -30,0,50; P; J L;" : COUNT=0 : IC=0
Amal 1,A4$ : Amal On 1 : Dim PICKED(4) : For N=1 To 4 : PICKED(N)=0 : Next N
Do
Repeat
K=True
Add IC,1,1 To 12
For M=1 To LEVEL+1
If PICKED(M)=IC
K=False
End If
Next M
Until K=True
Bob 2,-5,190,IC : Wait 3
Amal 2,A1$ : Amal On 2 : Sam Play 9,3,24000
While Chanmv(2)
MK=Mouse Key : If MK>0 Then ZIP : MK=0
Wend
Amal 11,A2$ : Amal On 11 : Sam Play 9,6,2500 : Wait 10
Amal 2,A3$ : Amal On 2
While Chanmv(2)
MK=Mouse Key : If MK>0 Then ZIP : MK=0
Wend
K=False
For N=1 To LEVEL+1
If GOODS(N)=IC
If Not ZIPPED : PICKED(N)=IC : End If
K=True
End If
Next N
If ZIPPED
Amal 2,"M -240,-180,20" : Amal On 2
If Not K
Sam Play 9,3,12000 : SCORE=SCORE+20
Else
Sam Play 9,7,8000 : SCORE=SCORE-10
End If
Else
Amal Off 2 : Amal 2,"M 0,80,50" : Amal On 2 : While Chanmv(2) : Wend
If Not K
Amal 2,"M 60,-270,20" : Amal On 2 : Sam Play 9,7,8000
While Chanmv(2) : Wend : Wait 3
Else
Sam Play 9,4,10000 : Wait 5 : Inc COUNT
End If
End If
While Chanmv(2) : Wend : Amal Off 11 : Bob 11,240,0,14
MK=Mouse Key : If MK>0 Then ZIP : MK=0
Exit If COUNT=LEVEL+1
If ZIPPED Then ZIP
Wait 10
Loop
Wait 25 : Amal Off : Music Off : Wait Vbl
Dim STORE(31) : For N=0 To 31 : STORE(N)=Colour(N) : Next N
Fade 3,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,
Wait 45 : Cls 21 : Bob Off : For N=0 To 31 : Colour N,STORE(N) : Next N
Cls 21 : Ink 14,21 : Flash 3,"(f00,25)(bbb,25)"
Box 20,20 To 330,250 : Ink 13, : Box 19,19 To 331,251 : Ink 14, : Box 18,18 To 332,252
Ink 11,21
T$="Well Done" : W=Text Length(T$)
Text(330-W)/2,100,T$
W=Text Length(NAME$)
Text(330-W)/2,129,NAME$
T$="Your score: "+Str$(SCORE) : W=Text Length(T$)
Text(330-W)/2,170,T$
Sam Play 15,3,10000 : Pen 3 : Paper 21
Locate ,28 : Centre "Click to continue"
Repeat : MK=Mouse Key : Until MK>0 : Cls 21
Text 50,100,"Off we go...."
A$=NAME$+"|"+Str$(LEVEL)+"/XXX\"+Str$(SCORE) : Command Line$=A$
Run "KIDS-7:travel.amos"
End Proc
Procedure ZIP
A5$="A 1,(21,1)(22,1)" : A6$="A 1,(21,1)(20,1)"
Sam Play 9,2,7000
If ZIPPED
'
' OPEN
'
Amal 10,A6$ : Amal On 10
ZIPPED=False : While Chanan(10) : Wend
Wait Vbl : Bob 10,197,169,20 : Wait Vbl
Else
'
' CLOSE
'
Amal 10,A5$ : Amal On 10
ZIPPED=True : While Chanan(10) : Wend
Wait Vbl : Bob 10,197,169,22 : Wait Vbl
End If
End Proc
Procedure STRIPPER
A$=Command Line$ : A=Instr(A$,"|") : B=Instr(A$,"/") : C=Instr(A$,"\") : L=Len(A$)
NAME$=Left$(A$,A-1) : L$=Mid$(A$,A+1,B-A-1) : LEVEL=Val(L$)
X$=Mid$(A$,B+1,C-B-1) : S$=Right$(A$,L-C) : SCORE=Val(S$)
End Proc